package quexi.iso.core
{
	import flash.display.Sprite;
	
	public class IsoScene extends Sprite
	{
		public static var GRID_WIDTH:int 	= 64;
		public static var GRID_HEIGHT:int 	= 32;
		
		private var _logicWidth:int;
		private var _logicHeight:int;
		
		public function IsoScene(w:int, h:int)
		{
			_logicWidth		= w;
			_logicHeight	= h;
			showTileGrid();
			
		}
		
		public function showTileGrid():void
		{
			var centerX:int = GRID_WIDTH / 2 * _logicWidth;
			var centerY:int = GRID_HEIGHT / 2 * _logicHeight;
			
			graphics.lineStyle(1,0x00ff00,0.5);
			
			for(var i:int = 0; i < _logicWidth; i ++)
			{
				graphics.moveTo(centerX + GRID_WIDTH/2*i, GRID_HEIGHT/2*i);
				graphics.lineTo(GRID_WIDTH/2*i, centerY + GRID_HEIGHT/2*i);
			}
			
			for(i = 0; i < _logicWidth; i ++)
			{
				graphics.moveTo(centerX - GRID_WIDTH/2*i, GRID_HEIGHT/2*i);
				graphics.lineTo(GRID_WIDTH/2*i, centerY + GRID_HEIGHT/2*i);
			}
		}
		//
	}
}